# 8.9
messages = ['111', '222', '333']
def show_messages(list_name):
    for value in list_name:
        print(value)
show_messages(messages)

# 8.10
sent_messages = []
def send_messages(list_name):
    while list_name:
        message = list_name.pop()
        print(f'{message}被移到sent_messages中')
        sent_messages.append(message)
send_messages(messages)
print(sent_messages)

# 8.11
send_messages(messages[:])
print(sent_messages)
print(messages)